//    Copyright (C) Kherty.  All rights reserved.
using System.Windows.Controls;
using System.Windows;

namespace OpenLS.Chart.UI
{
    class AllowNoneTemplateSelector:DataTemplateSelector
    {
        public override DataTemplate SelectTemplate(object item, DependencyObject container)
        {
            if (item != null)
                ((FrameworkElement) container).FindResource(new DataTemplateKey(item.GetType()));
            return (DataTemplate)new NoneResources().FindName("NoneTemplate");
        }
    }
}
